<template>
    <div class="first_level_page mine_page">
        <div class="top clear">
            <div class="top_img left">
                <img src='../../images/ticket_bg.png' alt="">
            </div>
            <div class="top_text left">
                <!-- <h2>登录/注册</h2> -->
                <p>{{ename}}</p>
                <div class="tel">
                    <img src="../../images/myInfoTel.png">
                   {{tel}}
                </div>
            </div>
        </div>
        <ul class="menu_list">
            <router-link to='/profile/info'>
                <li class="bb">
                    <span class="left"><img src="../../images/myInfo1.png" alt="">我的信息</span>
                    <em class="right"><img src="../../images/more.png" alt=""></em>
                </li>
            </router-link>
            <!-- <router-link to='/position'>
                <li class="bb">
                    <span class="left"><img src="../../images/myInfo2.png" alt="">组织架构</span>
                    <em class="right"><img src="../../images/more.png" alt=""></em>
                </li>
            </router-link> -->
            <!-- <router-link to='/order'>
                <li class="bb">
                    <span class="left"><img src="../../images/myInfo3.png" alt="">业务拓展</span>
                    <em class="right"><img src="../../images/more.png" alt=""></em>
                </li>
            </router-link> -->
            <router-link to="/profile/statistics">
                <li>
                    <span class="left"><img src="../../images/myInfo4.png" alt="">业绩统计</span><em class="right"><img src="../../images/more.png" alt=""></em>
                </li>
            </router-link>
       </ul>
       <!-- <ul class="menu_list">
            <router-link to='/integralMall'>
                <li class="bb">
                    <span class="left"><img src="../../images/myInfo5.png" alt="">培训中心</span><em class="right"><img src="../../images/more.png" alt=""></em>
                </li>
            </router-link>
            <router-link to='/integralMall'>
                <li>
                    <span class="left"><img src="../../images/myInfo6.png" alt="">关于管理版</span><em class="right"><img src="../../images/more.png" alt=""></em>
                </li>
            </router-link>
       </ul> -->
        <div class="heightBottom"></div>
        <transition name="router-slid" mode="out-in">
            <router-view></router-view>
        </transition>
        <foot-guide></foot-guide>
    </div>
</template>

<script>
    import footGuide from 'src/components/footer/footGuide'
    import {mapMutations, mapState} from 'vuex'
    import {getEmployees} from '../../service/getData'
    import {removeStore} from 'src/config/mUtils'

   let loginInfoStr = JSON.parse(localStorage.getItem("sloginInfo"));
    let sellerInfo = JSON.parse(localStorage.getItem("supplierInfo"))
    export default {
        data(){
            return{
                ename:null,
                tel:null
            }
        },
        mounted(){
            this.ss()
        },
        components:{
            footGuide,
        },
        methods:{
            ...mapMutations([
                'OUT_LOGIN'
            ]),
           async ss(){
               console.log(sellerInfo)
              let Info=await getEmployees(sellerInfo.msg);
                if(Info.eply!=null){
                    this.ename=Info.eply.ename
                    this.tel=Info.eply.tel
                }else{
                        this.OUT_LOGIN();
                        removeStore('supplierInfo');
                        removeStore('sloginInfo');
                        removeStore('EmployeeInfo');
                        removeStore('user_id');
                        this.waitingThing();
                        this.$router.replace('/login');
                }
            },
            waitingThing(){
                //取消推出
                clearTimeout(this.timer)
                this.isEnter=false;
                this.isLeave=true;
                this.timer = setTimeout(() =>{
                    clearTimeout(this.timer)
                    this.show=false;
                },200)
            },

        },
    }
</script>

<style lang="scss" scoped>
    .mine_page .top{background: #fff; padding:.36rem .2rem;position:relative;}
    .mine_page .top .top_img img{width:1.28rem;height:1.28rem;border-radius:.64rem; float:left;}
    .mine_page .top .top_text{font-size:.36rem;color:#333;margin-left:.2rem;}
    .mine_page .top .top_text h2{font-size:.32rem;color:#333;margin-top: .4rem;}
    .mine_page .top .top_text p{margin-top: .26rem; height: .36rem; line-height: .36rem;}
    .mine_page .top .top_text .tel{font-size: .26rem; color: #666; height: .28rem; line-height: .28rem; margin-top: .2rem;}
    .mine_page .top .top_text .tel img{width: .18rem; height: .28rem; float: left; margin-right: .1rem;}
    .menu_list{line-height:1.14rem;padding-left:.3rem;background:#fff;margin-top:.2rem;}
    .menu_list li{font-size:.3rem;color:#333;padding-right:.3rem;}
    .menu_list li:after{content: '';display: block;clear: both;}
    .menu_list li .left img{margin-right:.3rem;width:.56rem; vertical-align: middle;}
    .menu_list li .right{text-align:right;}
    .menu_list li .right img{width:.13rem;}
    .bb{border-bottom:.02rem solid #f2f2f2;}
    .jiubi_money_container{
        background: #fff;
        height: 1.5rem;
        width: 100%;
        clear: both;
        padding: .2rem 0;
        text-align:center;
        .jiubi_main{
            float: left;
            width: 33%;
            line-height: 0;
            border-right: .02rem solid #dedede;
        }
        .money_main{
            border-right: 0;
        }
        .jm_text{
            font-size: .3rem;
            color: #333;
            line-height:.6rem;
        }
        .jm_value{
            font-size: .34rem;
            color: #ffa101;
            height: .49rem;
            line-height: .34rem;
            padding-bottom: .15rem;
        }
    }
</style>
